package com.gz.service;

import com.gz.dao.MenuDao;
import com.gz.domain.Menu;

import java.util.List;

public class MenuService {
    MenuDao menuDao=new MenuDao();

    //查看菜单
    public List<Menu> list(){
        return menuDao.queryMulti("select * from menu",Menu.class);
    }

    public Menu getMenuById(int id){
        return menuDao.querySingle("select * from menu where id=?",Menu.class,id);
    }
}
